package MEx;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by MonsterENT on 10/12/17.
 */
public class MExAPI {

    public  MExAPI()
    {

    }

    public static String getCurDate()
    {
        Date d = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        return sdf.format(d);
    }

    public static  String toJson(String[] Keys,Object[] objs)
    {
        String json  = "{";
        for(int i =0;i < Keys.length;i++)
        {
            json += "\""+ Keys[i]  +"\"";
            json += ":"+ "\""+ objs[i] +"\"";
            if(i != Keys.length-1)
                json+=",";
        }

        json += "}";


        return json;
    }



}
